//
//  SPRegisterViewController.m
//  ShopProject
//
//  Created by kuangbiao on 2018/11/26.
//  Copyright © 2018 KB. All rights reserved.
//

#import "SPRegisterViewController.h"

@interface SPRegisterViewController ()
@property (weak, nonatomic) IBOutlet UIButton *registerBtn;
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;
@property (weak, nonatomic) IBOutlet UIButton *smsBtn;
@property (weak, nonatomic) IBOutlet UIButton *selectBtn;
@property (weak, nonatomic) IBOutlet UIButton *agreeBtn;

@end

@implementation SPRegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self initView];
}

- (void)initView{
    self.navigationItem.title = @"注册";
    self.registerBtn.layer.cornerRadius = 4.0f;
    self.loginBtn.layer.cornerRadius = 12.0f;
    self.smsBtn.layer.cornerRadius = 15.0f;
    self.smsBtn.layer.borderWidth = 1.0f;
    self.smsBtn.layer.borderColor = [UIColor colorWithHexString:@"eeeeee"].CGColor;
    
    NSString *title = @"我已阅读并同意《注册服务协议》";
    NSMutableAttributedString *attr = [[NSMutableAttributedString alloc]initWithString:title];
    [attr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"f48029"] range:NSMakeRange(7, title.length - 7)];
//    [attr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:11] range:NSMakeRange(7, title.length - 7)];
    [self.agreeBtn setAttributedTitle:attr forState:UIControlStateNormal];
}

- (IBAction)registerBtnClickAction:(id)sender {
    
}
- (IBAction)loginBtnClickAction:(id)sender {
    
}
- (IBAction)getSmsBtnClickAction:(id)sender {
    
}
//选择按钮点击事件
- (IBAction)selectBtnClickAction:(UIButton *)sender {
    sender.selected = !sender.selected;
}
//同意按钮点击事件
- (IBAction)agreeBtnClickAction:(id)sender {
}

@end
